package Models;

public class Malt {
	// Get malt Data from Database
	private int maltID;
	private String maltName;
	private double maltColor;
	private int maltSG;
	private int maltEff;
	private int maltBagLbs;
	private double maltOnHand;
	private double maltSpoken;
	private double maltOnOrder;
    private double maltToOrder = 0;
    private double maltMinimum;
    private double maltCost;
    private StockCode stockCode;
    
	public int getMaltID() {
		return maltID;
	}
	public void setMaltID(int maltID) {
		this.maltID = maltID;
	}
	public String getMaltName() {
		return maltName;
	}
	public void setMaltName(String maltName) {
		this.maltName = maltName;
	}
	public double getMaltColor() {
		return maltColor;
	}
	public void setMaltColor(double maltColor) {
		this.maltColor = maltColor;
	}
	public int getMaltSG() {
		return maltSG;
	}
	public void setMaltSG(int maltSG) {
		this.maltSG = maltSG;
	}
	public int getMaltEff() {
		return maltEff;
	}
	public void setMaltEff(int maltEff) {
		this.maltEff = maltEff;
	}
	public int getMaltBagLbs() {
		return maltBagLbs;
	}
	public void setMaltBagLbs(int maltBagLbs) {
		this.maltBagLbs = maltBagLbs;
	}
	public double getMaltOnHand() {
		return maltOnHand;
	}
	public void setMaltOnHand(double maltOnHand) {
		this.maltOnHand = maltOnHand;
	}
	public double getMaltSpoken() {
		return maltSpoken;
	}
	public void setMaltSpoken(double maltSpoken) {
		this.maltSpoken = maltSpoken;
	}
	public double getMaltOnOrder() {
		return maltOnOrder;
	}
	public void setMaltOnOrder(double maltOnOrder) {
		this.maltOnOrder = maltOnOrder;
	}
	public double getMaltMinimum() {
		return maltMinimum;
	}
	public void setMaltMinimum(double maltMinimum) {
		this.maltMinimum = maltMinimum;
	}
	public double getMaltCost() {
		return maltCost;
	}
	public void setMaltCost(double maltCost) {
		this.maltCost = maltCost;
	}
	public StockCode getStockCode() {
		return stockCode;
	}
	public void setStockCode(StockCode stockCode) {
		this.stockCode = stockCode;
	}
    
    //last two functions are for use in determining how much malt to order.
    public double getMaltToOrder() {
		return maltToOrder;
	}
	
	public void setMaltToOrder(final double maltToOrder) {
		this.maltToOrder = maltToOrder;
	}
    
    public void resetMaltToOrder(){
        this.maltToOrder = 0;
    }
    
    public float getPOLineItemPrice(){
        return ((float)this.getMaltBagLbs() * (float)this.getMaltCost());
    }
}
